<template>
    <view>
        <view class="backbox" :style="isNav?'background: #FFFFFF;':''">
            <topStatus></topStatus>
            <view class="tabsBack">
                <uni-icons type="left" color="#333" size="30" @click="goBack()"></uni-icons>
                <view class="page_til">AI推荐</view>
            </view> 
        </view>
    </view>
</template>

<script>
import topStatus from "@/components/topStatus/topStatus.vue";
export default {
components: {
    topStatus
},
data() {
return {
    isNav:false,
};
},
methods: {
    goBack(){
        const pages = getCurrentPages();
        if (pages.length > 1) {
            // 如果页面栈长度大于1，则说明有上一页，可以返回
            uni.navigateBack();
        } else {
            // 如果没有上一页，则导航到首页
            uni.reLaunch({
            url: '/pages/tab/home'
            });
        }
    },
},

}
</script>
<style lang='scss'>
.backbox{
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient( 180deg, #FFB794 0%, rgba(255,255,255,0) 100%);
    z-index: 99;
}
.tabsBack {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    // justify-content: center;
    padding-left: 16rpx;
    .page_til{
        font-size: 36rpx;
        font-weight: bold;
        margin-left: 244rpx;
    }
}
</style>